<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<script type="text/javascript" language="javascript" src="js/jquery-1.4.2.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery-ui-1.8.2.custom.js"></script>
<link href="themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />

</head>

<body>

<script language="javascript" type="text/javascript">
$(document).ready(function(){
	$('.mycalendar').datepicker({
		changeYear: true,
		changeMonth: true,
		dateFormat: 'yy-mm-dd',
		showAnim: 'fold',
		inline:true,
		yearRange: '1950:2011',
		onSelect: function(dateText, inst) { 
			//for(var key in inst){
			  //alert(key);
		   //}
		   alert(inst['currentYear'])
		   // id, input, selectedDay, selectedMonth, selectedYear, drawMonth, drawYear, inline, currentDay, currentMonth, currentYear, 

			//alert($('.mycalendar').parent().parent().parent().parent().parent().find('.ui-datepicker-year option:selected').val());
		}
	});
});
</script>

<input type="text" class="mycalendar" />

</body>
</html>
